package com.zhentao.controller;

import com.zhentao.config.Result;
import com.zhentao.pojo.TbCollection;
import com.zhentao.service.TbCollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController

@RequestMapping("coll")
public class TbCollectionContollerLx {

    @Autowired
    private TbCollectionService tbCollectionService;

   @RequestMapping("listById")
    public Result<List<TbCollection>> listById(Integer studentId){
       List<TbCollection> byStudentId = tbCollectionService.getByStudentId(studentId);
       return Result.success(byStudentId);


   }


}
